package com.polaris.live.viewmodel

import androidx.lifecycle.MutableLiveData
import com.polaris.live.net.homeService
import com.polaris.live.resp.back_resp.DisplayUserBean
import com.polaris.live.resp.back_resp.MatchMessageResp
import com.polaris.live.resp.base.ListResp
import com.polaris.live.common.mvvm.viewmodel.BaseViewModel
import com.polaris.live.common.network.request
import com.polaris.live.common.network.state.ResultState

/**
 * MatchingViewModel
 *
 * @author Created by 半仙 on 2023/10/18/018 11:45
 */
class MatchingViewModel : BaseViewModel() {

    val matchLiveData = MutableLiveData<ResultState<ListResp<DisplayUserBean>>>()
    fun getMatchData(pageNumber: Int) {
        request({ homeService.getMatch(pageNumber) }, matchLiveData)
    }

    val matchMessageLiveData = MutableLiveData<ResultState<MatchMessageResp>>()
    fun getMatchMessage() {
        request({ homeService.getMatchMessage() }, matchMessageLiveData)
    }
}